<!-- BEGIN navigation -->
<%- unless @preview_mode -%>
  <% if is_author_of?(@work) -%>
	<ul class="navigation">
  	<li><%= link_to "Add Chapter".t, new_work_chapter_path(@work) %></li>
	<li><%= link_to 'Edit'.t, edit_work_path(@work) %></li>
  	<li><%= link_to 'Delete'.t, @work, :confirm => 'Are you sure?'.t, :method => :delete -%></li>
  </ul>
  <% end -%>
<%- end -%>
<!-- END navigation -->

<%= render :partial => 'works/meta', :locals => {:work => @work} %>
  
  <div id="series-and-view-data">
    <%- unless @work.series.blank? -%>
      <ul id="work-series-data">
        <!-- found in series helper -->
        <%= show_series_data(@work) %>
      </ul>
    <%- end -%> 
    
    <%- if @work.number_of_posted_chapters > 1 -%>
      <%- if @chapters.length == 1 -%> 
      <!-- we're reading chapter-by-chapter -->
			<ul class="navigation">
			  <li><%= link_to "View entire work".t, @work -%></li>
			  <%= next_and_previous_links_listitems(@work, @chapter) -%>
			</ul>
      <%- else -%>
		<ul class="navigation">
		    <li><%= link_to "View chapter by chapter".t, 
                 url_for({:controller => :chapters, :action => :show, :work_id => @work, :id => @chapters.first}) -%>
			</li>
		</ul>
      <%- end -%>
    <%- end -%>
  </div>

  <div class="preface">
	<h2 class="title">
    <% if @work.restricted %><%= image_tag("lockblue.png", :size => "15x15", :alt => "(Restricted)".t) %><% end %>
    <% if @work.hidden_by_admin %><%= image_tag("lockred.png", :size => "15x15", :alt => "(Hidden by Admin)".t) %><% end %>
    <%=sanitize_title_for_display @work.title %>
	</h2>
  <h3 class="byline">
   <%= byline(@work) -%>
  </h3>
  
  <%- unless @work.summary.blank? -%>
  <blockquote class="summary">
    <h3><%=h 'Summary:'.t %></h3>
    <%=sanitize_and_format_for_display @work.summary %>
  </blockquote>
  <%- end -%>
  
  <%- unless @work.notes.blank? -%>
  <blockquote class="notes">
    <h3><%=h 'Notes:'.t %></h3>
    <%=sanitize_and_format_for_display @work.notes %>
  </blockquote>
  <%- end -%>
  
  <% if @work.is_wip -%>
  <p class="story-complete">
    <%= wip_message(@work) %>
  </p>
  <% end -%></div>
  
